<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html>
<head>
<title>我要验车</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
 <!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet"> 
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
<!--//end-animate-->
<!----webfonts--->
<link href='http://fonts.useso.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'>
<!---//webfonts---> 
 <!-- Meters graphs -->

<link rel="stylesheet" href="css/bootstrapvalidator/bootstrap.css"/>
<link rel="stylesheet" href="css/bootstrapvalidator/bootstrapValidator.css"/>
<script src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrapvalidator/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrapvalidator/bootstrapValidator.js"></script>
    
<!-- Placed js at the end of the document so the pages load faster -->

</head> 
   
 <body class="sign-in-up">
 	<form method="post" id="fm" class="form-horizontal">
    	<section>
			<div id="page-wrapper" class="sign-in-wrapper">
				<div class="graphs">
					<div class="sign-up">
						<h3>我要验车</h3>
						<p class="creating"></p>
						<h4 align="center">请根据待检机动车行使证填写</h4>
						
						<div class="form-group">
                            <label class="col-lg-2 control-label">Password</label>
                            <div class="col-lg-5">
                                <input type="text" class="form-control" name="firstName" />
                            </div>
                        </div>
						
						<div class="sign-u">
							<div class="sign-up1">
								<h4>1.联系人姓名:</h4>
							</div>
							<div class="sign-up2">
									<input type="text" class="form-control" name="name" id="name" />
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>2.联系人手机号 :</h4>
							</div>
							<div class="sign-up2">
									<input type="text" name="mobile" id="mobile" />
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>3.车辆类型 :</h4>
							</div>
							<div class="sign-up2">
								<select name="vehicleType" id="vehicleType">
									<option value="1">小型轿车(7座以下)</option>
								</select>
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>4.车牌所在地 :</h4>
							</div>
							<div class="sign-up2">
								<select name="address" id="address">
									<option value="1">北京市(京)</option>
									<option value="2">天津市(津)</option>
									<option value="3">河北省(冀)</option>
									<option value="4">山西省(晋)</option>
									<option value="5">内蒙古自治区(蒙)</option>
									<option value="6">辽宁省(辽)</option>
									<option value="7">吉林省(吉)</option>
									<option value="8">黑龙江省(黑)</option>
									<option value="9">上海市(沪)</option>
									<option value="10">江苏省(苏)</option>
									<option value="11">浙江省(浙)</option>
									<option value="12">安徽省(皖)</option>
									<option value="13">福建省(闽)</option>
									<option value="14">江西省(赣)</option>
									<option value="15">山东省(鲁)</option>
									<option value="16">河南省(豫)</option>
									<option value="17">湖北省(鄂)</option>
									<option value="18">湖南省(湘)</option>
									<option value="19">广东省(粤)</option>
									<option value="20">广西壮族自治区(桂)</option>
									<option value="21">海南省(琼)</option>
									<option value="22">四川省(川)</option>
									<option value="23">贵州省(贵)</option>
									<option value="24">云南省(云)</option>
									<option value="25">重庆市(渝)</option>
									<option value="26">西藏自治区(藏)</option>
									<option value="27">陕西省(陕)</option>
									<option value="28">甘肃省(甘)</option>
									<option value="29">青海省(青)</option>
									<option value="30">宁夏回族自治区(宁)</option>
									<option value="31">新疆维吾尔自治区(新)</option>
								</select>
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>5.验车车牌号 :</h4>
							</div>
							<div class="sign-up2">
									<input type="text" name="plateNo" id="plateNo" />
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>6.行使证所有人:</h4>
							</div>
							<div class="sign-up2">
									<input type="text" name="owner" id="owner" />
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>7.车辆识别代码 :</h4>
							</div>
							<div class="sign-up2">
									<input type="text" name="engineNo" id="engineNo" />
							</div>
						</div>
						<div class="sign-u">
							<div class="sign-up1">
								<h4>8.登记时间 :</h4>
							</div>
							<div class="sign-up2">
								<select name="registerDate" id="registerDate">
									<option value="a">6年以内</option>
									<option value="b">6至10年</option>
									<option value="c">10年以上</option>
								</select>
							</div>
						</div>
						<div class="sub_home" align="center">
							<div class="sub-login-left">
									<input type="button" value="下一步" onclick="examinationCar();">
							</div>
						</div>
					</div>
				</div>
			</div>
			<footer>
			   <p>Copyright &copy; 2015.Company name All rights reserved.</p>
			</footer>
        <!--footer section end-->
	</section>
	</form>
   <script type="text/javascript">
   
//    var name=$("#name").val();
// 		var mobile=$("#mobile").val();
// 	var vehicleType=$("#vehicleType").val();
// 	var address=$("#address").val();
// 	var plateNo=$("#plateNo").val();
// 	var owner=$("#owner").val();
// 	var engineNo=$("#engineNo").val();
// 	var registerDate=$("#registerDate").val();
	
	
   		$(document).ready(function() {
   		    $('#fm').bootstrapValidator({
   		    	live: 'disabled',
   		     	message: 'This value is not valid',
   	        	feedbackIcons: {
	   	            valid: 'glyphicon glyphicon-ok',
	   	            invalid: 'glyphicon glyphicon-remove',
	   	            validating: 'glyphicon glyphicon-refresh'
	   	            },
   		        fields: {
   		        	firstName: {
   		                validators: {
   		                    notEmpty: {
   		                        message: '联系人姓名不能为空'
   		                    }
   		                }
   		            }
   		        }
   		    });
   		});
   		
   		function examinationCar(){
   			$('#fm').bootstrapValidator('validate');
	        if($('#fm').data('bootstrapValidator').isValid()){
	        	var name=$("#name").val();
	  			var mobile=$("#mobile").val();
				var vehicleType=$("#vehicleType").val();
				var address=$("#address").val();
				var plateNo=$("#plateNo").val();
				var owner=$("#owner").val();
				var engineNo=$("#engineNo").val();
				var registerDate=$("#registerDate").val();
				
				var obj = {"name":$("#name").val(),
						   "mobile":$("#mobile").val(),
						   "vehicleType":$("#vehicleType").val(),
						   "address":$("#address").val(),
						   "plateNo":$("#plateNo").val(),
						   "owner":$("#owner").val(),
						   "engineNo":$("#engineNo").val(),
						   "registerDate":$("#registerDate").val()};
				var saveData = JSON.stringify(obj);
	   		 	window.location.href="checkCarConfirm?saveData="+saveData; 
	        }
   		}
   </script>
</body>
</html>